import java.util.Comparator;
public class ComparatorByMark implements Comparator<Student> {
    @Override
    public int compare(Student stu1, Student stu2){
        return (int)(stu1.getTotalScore()-stu2.getTotalScore());
    }
}